<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
		<script>
			function getCardName(card)
			{
				var nums = ['A',2,3,4,5,6,7,8,9,10,'J','Q','K'];
				var types = [' cơ', ' rô', ' chuồn', ' bích'];
				return nums[card.num]+types[card.type];
			}
			var cards = [{"num":0,"type":0},{"num":0,"type":1},{"num":0,"type":2},{"num":0,"type":3},{"num":1,"type":0},{"num":1,"type":1},{"num":1,"type":2},{"num":1,"type":3},{"num":2,"type":0},{"num":2,"type":1},{"num":2,"type":2},{"num":2,"type":3},{"num":3,"type":0},{"num":3,"type":1},{"num":3,"type":2},{"num":3,"type":3},{"num":4,"type":0},{"num":4,"type":1},{"num":4,"type":2},{"num":4,"type":3},{"num":5,"type":0},{"num":5,"type":1},{"num":5,"type":2},{"num":5,"type":3},{"num":6,"type":0},{"num":6,"type":1},{"num":6,"type":2},{"num":6,"type":3},{"num":7,"type":0},{"num":7,"type":1},{"num":7,"type":2},{"num":7,"type":3},{"num":8,"type":0},{"num":8,"type":1},{"num":8,"type":2},{"num":8,"type":3},{"num":9,"type":0},{"num":9,"type":1},{"num":9,"type":2},{"num":9,"type":3},{"num":10,"type":0},{"num":10,"type":1},{"num":10,"type":2},{"num":10,"type":3},{"num":11,"type":0},{"num":11,"type":1},{"num":11,"type":2},{"num":11,"type":3},{"num":12,"type":0},{"num":12,"type":1},{"num":12,"type":2},{"num":12,"type":3}];
			var marks = Array();
			for(i=0;i<52;i++)
				marks[i]=0;
			var collection = Array();
			
			for(i=0;i<10;i++)
			{
				var x;
				do
				{
					x=parseInt((Math.random()*52));
					//alert(marks[x]);
				}while(marks[x]!==0);
				marks[x]=1;
				collection[i] = cards[x];
				
			}
			for(var i in collection){
				document.writeln(getCardName(collection[i])+'<br/>');
			}
			
		</script>
    </body>
</html>
